Building Turing Geovisualization Engine with R

L Hama

2020-06-15

Intro

  • Institutions: Leeds Institute for Data Analytics & Turing Institute

  • Project: Dr. Nik Lomax and Dr. Roger Beecham

  • Research Theme: Urban Analytics, Sir Alan Wilson and Prof Mark Birkin.

  • May 2019 - Oct 2020

  • More geo-visualization than research engineering or engineering research.

Talk Overview

< image >

  • Data visualization which means graphics which means using CPU and/or GPU
    • Ubiquitous (Lyytinen and Yoo 2002)
    • Interactive (Benyon 2014)
      • design, technology, people, activities
  • R doing what it does (best?): data analysis
  • Turing Geo-visualization Engine (TGVE)

The story of a Graphics Processing Unit (GPU)

Why R

  • One of two choices (Python which I would have prefered) both being Open Source
    • Being Open Source not so fancy any more?
  • Colleagues who use R around University of Leeds.
  • Focus on Grammar of Graphics (Wilkinson 2005) and other academic excellence such as ggplot2 (Wickham 2016)
  • That also means a great set of tools
  • You might have better reasons.

Graphics R v Web

GPU/CPU Graphics

Graphics R v Web (2)

Web Tech, Python and R

R graphics

Mastering Software Development in R

Screenshot from (Meinicke et al. 2017)

  • library(help = "grDevices"), x11(), quartz() etc
  • grid package is base R.

R web applications

Shiny v rPlumber Shiny v rPlumber

Web mapping (Xerox)

xerox map on netscape

Web mapping (now)

web mapping libraries

Web mapping (now)

web mapping libraries

Turing Geo-Visualization Engine (TGVE or eAtlas)

Turing eAtlas screenshot

R & React (JavaScript)

library(geoplumber)
# view a dataset such as the `traffic` sf object bundled 
t <- gp_map(geoplumber::traffic, browse_map = FALSE,
            height = "320px", width = "90%")
# use includeHTML for markdown
htmltools::includeHTML(t)
geoplumber | output

R & React (JavaScript)

p <- "~/code/geoplumber/my-app/"
ow <- setwd(p)
r <- gp_explore()
setwd(ow)
i <- webshot::webshot("geo", "explore.png")
knitr::include_graphics(i)
r$kill()

R & React (TGVE)

Turing Geo-visualization Engine in geoplumber: gp_explore

R & React (JavaScript)

MS SandDance

Conclusion

  • TGVE is not quite in R, in the sense that we cannot have interactivity and ubiquitous R support
  • R should do what it does best and likewise JavaScript
  • We should not be writing HTML via R

Thank you

Thank you

Benyon, David. 2014. “Designing Interactive Systems: A Comprehensive Guide to Hci, Ux and Interaction Design.”

Lyytinen, Kalle, and Youngjin Yoo. 2002. “Ubiquitous Computing.” Communications of the ACM 45 (12): 63–96.

Meinicke, Jens, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, and Gunter Saake. 2017. Mastering Software Variability with Featureide. Springer.

Wickham, Hadley. 2016. Ggplot2: Elegant Graphics for Data Analysis. Springer.

Wilkinson, Leland. 2005. “Guides.” The Grammar of Graphics, 347–56.